package com.itheima.io.objectoutputstream.demo01;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class ObjectInputStreamDemo02 {

    public static void main(String[] args) throws IOException, ClassNotFoundException {

        ObjectInputStream objectInputStream = new ObjectInputStream(new FileInputStream("itheima-io-objectoutstream\\obj.txt"));

        Student student = (Student) objectInputStream.readObject();

        System.out.println(student.getName() + ", " + student.getAge() + ", " + student.getAdress());



    }
}
